#ifndef ONLINEUSERS_H_
#define ONLINEUSERS_H_

#include <list>

class OnlineUsers {

private:

	int myUserID;

public:

	OnlineUsers(int myID);

	OnlineUsers();

	virtual ~OnlineUsers();

	/*
	 * adds the online users to the list.
	 * It does not clear the list.
	 * */
	void getOnlineUsers(std::list<int> &users);

	bool isUserOnline(int userID, bool deleteUser = false);

	/*
	 * Returns true if there are other users online
	 * */
	bool areUsersOnline(int myID);

	void logIn();

	void logOut();

	static void removeOnlineUsersDatabase();

};

#endif /* ONLINEUSERS_H_ */
